import { CreateAccount, ForgetPassword, RegisterSms } from '../model/sys/accountModel';
import { defHttp } from '/@/utils/http/axios';
export default class AccountApi {
  path = '/sys/account';
  constructor(protected axios = defHttp) {}
  sms(data: RegisterSms): Promise<any> {
    return this.axios.post({ url: `${this.path}/sms`, data });
  }

  passwordSms(mobile: string): Promise<any> {
    return this.axios.get({ url: `${this.path}/passwordSms/${mobile}` });
  }

  create(data: CreateAccount) {
    return this.axios.post({ url: `${this.path}`, data });
  }

  forgetPassword(data: ForgetPassword) {
    return this.axios.post({ url: `${this.path}/forgetPassword`, data });
  }
}
